package controller;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import model.TypeModel;
import dao.Type;

public class ManageTypes {
	private static final long serialVersionUID = 1L;
	
	public void doGet(HttpServletRequest request, HttpServletResponse response)
								throws ServletException, IOException{
		List<TypeModel> types = new ArrayList<TypeModel>();
		Type typeDTO = new Type();
		types = typeDTO.ListType();
		request.setAttribute("types",types);
		request.getRequestDispatcher("types.jsp").forward(request, response);
//		RequestDispatcher dispatcher =
//			request.getRequestDispatcher
//			("products.jsp");
//			dispatcher.forward(request, response);
	}

}
